import { request } from 'umi';

import { PlanListParamsType, PlanListReturnType, PlanInfoParamsType } from './API';
//

export async function addPlanModeAPI(params?: PlanListReturnType) {
  return request<API.APIReturnType<any>>('/api/planMode/add', {
    method: 'post',
    data: params || {},
  });
}
export async function deletePlanModeAPI(params?: PlanInfoParamsType) {
  return request<API.APIReturnType<any>>('/api/planMode/delete', {
    method: 'post',
    data: params || {},
  });
}
export async function editPlanModeAPI(params?: PlanListReturnType) {
  return request<API.APIReturnType<any>>('/api/planMode/edit', {
    method: 'post',
    data: params || {},
  });
}
export async function queryPlanModeInfoAPI(params?: PlanInfoParamsType) {
  return request<API.APIReturnType<PlanListReturnType>>('/api/planMode/info', {
    params: params || {},
  });
}
export async function queryPlanModeListAPI(params?: PlanListParamsType) {
  return request<API.APIReturnType<PlanListReturnType>>('/api/planMode/list', {
    params: params || {},
  });
}
